From be0964d9e1d110ff647d3d6433835786b88f9435 Mon Sep 17 00:00:00 2001
From: Lauri Vuorela <lauri.vuorela@gmail.com>
Date: Mon, 5 Feb 2024 02:16:30 +0100
Subject: format currency with thousand separators (#81)

---
 src/app/groups/[groupId]/reimbursement-list.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/app/groups/[groupId]/reimbursement-list.tsx')

diff --git a/src/app/groups/[groupId]/reimbursement-list.tsx b/src/app/groups/[groupId]/reimbursement-list.tsx
index 54ee9d7..8031aa5 100644
--- a/src/app/groups/[groupId]/reimbursement-list.tsx
+++ b/src/app/groups/[groupId]/reimbursement-list.tsx
@@ -1,5 +1,6 @@
 import { Button } from '@/components/ui/button'
 import { Reimbursement } from '@/lib/balances'
+import { formatCurrency } from '@/lib/utils'
 import { Participant } from '@prisma/client'
 import Link from 'next/link'
 
@@ -42,9 +43,7 @@ export function ReimbursementList({
               </Link>
             </Button>
           </div>
-          <div>
-            {currency} {(reimbursement.amount / 100).toFixed(2)}
-          </div>
+          <div>{formatCurrency(currency, reimbursement.amount)}</div>
         </div>
       ))}
     </div>
-- 
cgit v1.3

